<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn"
           uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@page isELIgnored="false" %>
<!doctype html>
<html class="no-js">

<head>
    <title>${ranking_response_vo.rankingData.desc}</title>
</head>

<jsp:include page="templ/header.jsp"/>

<jsp:include page="templ/nav.jsp"/>


<div class="am-g am-container">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-8">
        <div class="newstitles">
            <h3 class="main-title">${ranking_response_vo.rankingData.desc}</h3>
            来源：<a href="${ranking_response_vo.rankingData.url}"
                  target="_blank">${ranking_response_vo.websiteInfo.name}</a>
            &nbsp;&nbsp;时间：${ranking_response_vo.rankingData.create_time.substring(0, 10)}
        </div>

        <div class="contents">${ranking_response_vo.rankingData.content}</div>

    </div>
    <div class="am-u-sm-0 am-u-md-0 am-u-lg-4">

        <c:set var="flag" value="true"/>
        <c:forEach var="site_ranks" items="${ranking_map}"
                   varStatus="site_ranks_status">
            <c:if test="${flag}">
                <div data-am-widget="titlebar" class="am-titlebar am-titlebar-default">
                    <h2 class="am-titlebar-title ">
                            ${site_ranks.key.name}
                    </h2>
                </div>

                <div data-am-widget="list_news" class="am-list-news am-list-news-default right-bg">
                    <ul class="am-list">
                        <c:forEach items="${site_ranks.value}" var="rank" varStatus="rank_status">
                            <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
                                <div class=" am-u-sm-12 am-list-main">
                                    <h3 class="am-list-item-hd">
                                        <c:set var="max_index" value="${rank.desc.length() >
                                             19? 19 : rank.desc.length() - 1}"/>
                                        <c:if test="${rank.isHas_content() != null &&
                                                        rank.isHas_content()}">
                                            <a href="${domain_name}/ranking/${rank._id}"
                                               target="_blank">${rank_status.index + 1}.
                                                &nbsp;
                                                    ${rank.desc.substring(0, max_index + 1)}
                                            </a>
                                        </c:if>
                                        <c:if test="${rank.isHas_content() == null ||
                                                        !rank.isHas_content()}">
                                            <a href="${rank.url}"
                                               target="_blank">${rank_status.index + 1}.
                                                &nbsp;
                                                    ${rank.desc.substring(0, max_index + 1)}
                                            </a>
                                        </c:if>
                                    </h3>
                                </div>
                            </li>
                            <hr data-am-widget="divider" style="margin: 0.8rem 0;"
                                class="am-divider am-divider-default"/>
                        </c:forEach>
                    </ul>
                </div>
                <c:if test="${site_ranks_status.index == 2}">
                    <c:set var="flag" value="false"/>
                </c:if>
            </c:if>
        </c:forEach>

    </div>
</div>
</div>


<jsp:include page="templ/footer.jsp"/>


</body>
</html>